<?php

declare (strict_types=1);
/**
 * @copyright 深圳市易果网络科技有限公司
 * @version 1.0.0
 * @link https://dayiguo.com
 */

namespace App\Controller\agent;

use App\Dao\AgentBankDao;
use App\Service\Agent\RegionService;
use App\Middleware\User\AgentMiddleware;

use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Annotation\AutoController;
use Hyperf\HttpServer\Annotation\Middleware;

/**
 * 区域控制器
 *
 * @AutoController()
 * @Middleware(AgentMiddleware::class)
 * @author 张昊(2396675557@qq.com)
 * @package App\Controller\admin
 */
class RegionController extends Controller
{

    /**
     * @Inject
     * @var RegionService
     */
    public $region_service;


    /**
     * 区域服务
     */
    public function list()
    {
        $result = $this->region_service->list();

        $this->success( $result );
    }

    /**
     * 分公司直招区县代理
     */
    public function directMoveArea()
    {
        $result = $this->region_service->directMoveArea();

        $this->success( $result );
    }

    /**
     * 分公司直招市代理
     */
    public function directMoveCity()
    {
        $result = $this->region_service->directMoveCity();

        $this->success( $result );
    }
}